
include $(PROJECT_ROOT)/autoconfig.mk

obj-$(CONFIG_NET)     	+= net.o
obj-$(CONFIG_NET)     	+= ip.o
obj-$(CONFIG_NET)     	+= ping.o
obj-$(CONFIG_NET)     	+= eth.o
obj-$(CONFIG_NET_ARP) 	+= arp.o

inc-$(CONFIG_NET)    	+= $(INCLUDE_DIR)/net/net.h
inc-$(CONFIG_NET)      	+= $(INCLUDE_DIR)/net/eth.h
inc-$(CONFIG_NET)     	+= $(INCLUDE_DIR)/net/ping.h
inc-$(CONFIG_NET_ARP) 	+= $(INCLUDE_DIR)/net/arp.h

INCLUDES := -I$(INCLUDE_DIR) \
			-I$(INCLUDE_DIR)/generated \
			-I$(INCLUDE_DIR)/net

all: $(obj-y)
$(obj-y):
%.o : %.c
	$(CC) $(CFLAGS) $(ARCH_CPPFLAGS) $(INCLUDES) -c $< -o $(BUILD_OJB_DIR)/$@

.PHONY: install
install:
	cp $(inc-y) $(INSTALL_INC_DIR)